home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / diagramf / tugboat.cmn < prev   
Text File  |  1993-01-11  |  27KB  |  897 lines

  1. %% @latexfile{
  2. %%     filename="tugboat.cmn",
  3. %%     version="1.10",
  4. %%     date="8-Mar-1992",
  5. %%     filetype="common macros for TUGboat",
  6. %%     copyright="Copyright (C) TeX Users Group.
  7. %%            Copying of this file is authorized only if either:
  8. %%            (1) you make absolutely no changes to your copy, OR
  9. %%            (2) if you do make changes, you first rename it to some
  10. %%                other name.",
  11. %%     author="TeX Users Group",
  12. %%     address="TeX Users Group",
  13. %%            P. O. Box 9506,
  14. %%            Providence, RI 02940,
  15. %%            USA",
  16. %%     telephone="401-751-7760",
  17. %%     email="Internet: TUGboat@Math.AMS.com",
  18. %%     codetable="ISO/ASCII",
  19. %%     checksumtype="line count",
  20. %%     checksum="894",
  21. %%     keywords="tex users group, tugboat, common macros",
  22. %%     abstract="This file contains macros common to both
  23. %%            the PLAIN and LaTeX style files for TUGboat,
  24. %%            the Communications of the TeX Users Group.
  25. %%            Among other things, it contains supplementary
  26. %%            definitions for abbreviations and logos that
  27. %%            appear in TUGboat."
  28. %%     }
  29. %%
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31.  
  32. \def\fileversion{v1.10}
  33. \def\filedate{8 March 1992}
  34.  
  35. \message{File `TUGBOAT.CMN' \fileversion \space\space <\filedate>}
  36.  
  37. %
  38. %               *****     TUGBOAT.CMN   *****
  39. %
  40. %       See the bottom of the file (after \endinput) for a list of
  41. %       items defined.
  42. %       
  43.  
  44. % *************************************************************************
  45.  
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47. %
  48. %     *****  helpful shorthand  *****
  49. %
  50.  
  51. %  The following allow for easier changes of category.  These require that
  52. %  the character be addressed as a control-sequence: e.g. \makeescape\/ will
  53. %  make the / an escape character.
  54.  
  55. \def\makeescape#1{\catcode`#1=0 }
  56. \def\makebgroup#1{\catcode`#1=1 }
  57. \def\makeegroup#1{\catcode`#1=2 }
  58. \def\makemath#1{\catcode`#1=3 }
  59. \def\makealign#1{\catcode`#1=4 }
  60. \def\makeeol#1{\catcode`#1=5 }
  61. \def\makeparm#1{\catcode`#1=6 }
  62. \def\makesup#1{\catcode`#1=7 }
  63. \def\makesub#1{\catcode`#1=8 }
  64. \def\makeignore#1{\catcode`#1=9 }
  65. \def\makespace#1{\catcode`#1=10 }
  66. \def\makeletter#1{\catcode`#1=11 }
  67. \def\makeother#1{\catcode`#1=12 }
  68. \def\makeactive#1{\catcode`#1=13 }
  69. \def\makecomment#1{\catcode`#1=14 }
  70.  
  71. \def\makeatletter{\catcode`\@=11 }      % included for historical reasons
  72. \chardef\other=12
  73. \def\makeatother{\catcode`\@=\other}
  74.  
  75.                                         % alternative to localization
  76. \def\savecat#1{%
  77.   \expandafter\xdef\csname\string#1savedcat\endcsname{\the\catcode`#1}}
  78. \def\restorecat#1{\catcode`#1=\csname\string#1savedcat\endcsname}
  79.  
  80.  
  81. \savecat\@
  82. \makeletter\@           % used, as in PLAIN, in protected control sequences
  83.  
  84.                         % for restoring meanings of global control sequences
  85. \def\SaveCS#1{%
  86.   \def\scratch{\expandafter\let\csname saved@@#1\endcsname}%
  87.   \expandafter\scratch\csname#1\endcsname}
  88. \def\RestoreCS#1{%
  89.   \def\scratch{\expandafter\let\csname#1\endcsname}%
  90.   \expandafter\scratch\csname saved@@#1\endcsname}
  91.  
  92.  
  93. % To distinguish between macro files loaded
  94.  
  95. \def\plaintubstyle{plain}
  96. \def\latextubstyle{latex}
  97. \ifx\tugstyloaded@\undefined\let\tugstyloaded@\plaintubstyle\fi
  98.  
  99. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  100. %
  101. %     *****  abbreviations and logos  *****
  102. %
  103.  
  104. \def\AllTeX{(\La)\TeX}
  105.  
  106. \def\AMS{American Mathematical Society}
  107.  
  108. \def\AmS{{\the\textfont2 A}\kern-.1667em\lower.5ex\hbox
  109.         {\the\textfont2 M}\kern-.125em{\the\textfont2 S}}
  110. \def\AmSTeX{\AmS-\TeX}
  111.  
  112. \def\aw{A\kern.1em-W}
  113. \def\AW{Addison\kern.1em-\penalty\z@\hskip\z@skip Wesley}
  114.  
  115. \def\BibTeX{{\rm B\kern-.05em{\smc i\kern-.025emb}\kern-.08em\TeX}}
  116.  
  117. \def\CandT{{\sl Computers \& Typesetting}}
  118.  
  119. \def\DVItoVDU{DVIto\kern-.12em VDU}
  120.  
  121. %       Japanese TeX
  122. \def\JTeX{\leavevmode\hbox{\lower.5ex\hbox{J}\kern-.18em\TeX}}
  123.  
  124. \def\JoT{{\sl The Joy of \TeX}}
  125.  
  126. \def\LAMSTeX{L\raise.42ex\hbox{\kern-.3em\the\scriptfont2 A}%
  127.     \kern-.2em\lower.376ex\hbox{\the\textfont2 M}\kern-.125em
  128.     {\the\textfont2 S}-\TeX}
  129.  
  130. %       note -- \LaTeX definition is from LATEX.TEX 2.09 of 7 Jan 86,
  131. %               adapted for additional flexibility in TUGboat
  132. %\def\LaTeX{\TestCount=\the\fam \leavevmode L\raise.42ex
  133. %       \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}\kern-.15em\TeX}
  134. %       note -- broken in two parts, to permit separate use of La,
  135. %               as in (La)TeX
  136. \def\La{\TestCount=\the\fam \leavevmode L\raise.42ex
  137.         \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}}
  138. \def\LaTeX{\La\kern-.15em\TeX}
  139.  
  140. %       for Robert McGaffey
  141. \def\Mc{\setbox\TestBox=\hbox{M}M\vbox to\ht\TestBox{\hbox{c}\vfil}}
  142.  
  143. \font\manual=logo10 % font used for the METAFONT logo, etc.
  144. \def\MF{{\manual META}\-{\manual FONT}}
  145. \def\mf{{\smc Metafont}}
  146. \def\MFB{{\sl The \slMF book}}
  147.  
  148. %       multilingual (INRS) TeX
  149. \def\mtex{T\kern-.1667em\lower.5ex\hbox{\^E}\kern-.125emX}
  150.  
  151. \def\pcMF{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}MF}
  152. \def\PCTeX{PC\thinspace\TeX}
  153. \def\pcTeX{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}\TeX}
  154.  
  155. \def\Pas{Pascal}
  156.  
  157. \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
  158. \def\PiCTeX{\PiC\kern-.11em\TeX}
  159.  
  160. \def\plain{{\tt plain}}
  161.  
  162. \def\POBox{P.\thinspace O.~Box }
  163. \def\POBoxTUG{\POBox\unskip~9506, Providence, RI~02940}
  164.  
  165. \def\PS{{Post\-Script}}
  166.  
  167. \def\SC{Steering Committee}
  168.  
  169. \def\SliTeX{{\rm S\kern-.06em{\smc l\kern-.035emi}\kern-.06em\TeX}}
  170.  
  171. \def\slMF{\MF}
  172. %       Use \font\manualsl=logosl10 instead, if it's available,
  173. %       for \def\slMF{{\manualsl META}\-{\manualsl FONT}}
  174.  
  175. %       Atari ST (Klaus Guntermann)
  176. \def\stTeX{{\smc st\rm\kern-0.13em\TeX}}
  177.  
  178. \def\TANGLE{{\tt TANGLE}}
  179.  
  180. \def\TB{{\sl The \TeX book}}
  181. \def\TP{{\sl \TeX\/}: {\sl The Program\/}}
  182.  
  183. \def\TeX{T\hbox{\kern-.1667em\lower.424ex\hbox{E}\kern-.125emX}}
  184.  
  185. \def\TeXhax{\TeX hax}
  186.  
  187. %       Don Hosek
  188. \def\TeXMaG{\TeX M\kern-.1667em\lower.5ex\hbox{A}\kern-.2267emG}
  189.  
  190. %\def\TeXtures{\TestCount=\the\fam
  191. %       \TeX\-\hbox{$\fam\TestCount\scriptstyle TURES$}}
  192. \def\TeXtures{{\it Textures}}
  193.  
  194. \def\TeXXeT{\TeX--X\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT}
  195.  
  196. \def\tubfont{\sl}               % redefined in other situations
  197. \def\TUB{{\tubfont TUGboat\/}}
  198.  
  199. \def\TUG{\TeX\ \UG}
  200.  
  201. \def\UG{Users Group}
  202.  
  203. \def\UNIX{{\smc unix}}
  204.  
  205. \def\VAX{\leavevmode\hbox{V\kern-.12em A\kern-.1em X}}
  206.  
  207. \def\VorTeX{V\kern-2.7pt\lower.5ex\hbox{O\kern-1.4pt R}\kern-2.6pt\TeX}
  208.  
  209. \def\XeT{\leavevmode\hbox{X\kern-.125em\lower.424ex\hbox{E}\kern-.1667emT}}
  210.  
  211. \def\WEB{{\tt WEB}}
  212. \def\WEAVE{{\tt WEAVE}}
  213.  
  214.  
  215.  
  216. %********************************************************************
  217.  
  218. \newlinechar=`\^^J
  219. \normallineskiplimit=1pt
  220.  
  221. \clubpenalty=10000
  222. \widowpenalty=10000
  223.  
  224. \def\NoParIndent{\parindent=\z@}
  225. \newdimen\normalparindent        \normalparindent=20pt          % plain = 20pt
  226. \def\NormalParIndent{\global\parindent=\normalparindent}
  227. \NormalParIndent
  228.  
  229. \def\BlackBoxes{\overfullrule=5pt }
  230. \def\NoBlackBoxes{\overfullrule=\z@ }
  231. \def\newline{\hskip\z@ plus \pagewd \break}
  232. \def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M}
  233.  
  234. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  235. %
  236. %     *****  utility registers and definitions  *****
  237. %
  238.  
  239. %       test registers for transient use; paired - internal/external
  240. \newbox\T@stBox                 \newbox\TestBox
  241. \newcount\T@stCount             \newcount\TestCount
  242. \newdimen\T@stDimen             \newdimen\TestDimen
  243. \newif\ifT@stIf                 \newif\ifTestIf
  244.  
  245.  
  246. %       \cs existence test, stolen from TeXbook exercise 7.7
  247. \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax }
  248.  
  249. % LaTeX conventions which are also useful here.
  250. \ifx\tugstyloaded@\plaintubstyle
  251.   \let\@@input\input
  252.   \def\iinput#1{\@@input#1 }
  253.   \def\@inputcheck{\if\@nextchar\bgroup
  254.     \expandafter\iinput\else\expandafter\@@input\fi}
  255.   \def\input{\futurelet\@nextchar\@inputcheck}
  256. \fi
  257.  
  258. %       Smashes repeated from AMS-TeX; PLAIN implements only full \smash .
  259. \newif\iftop@           \newif\ifbot@
  260. \def\topsmash{\top@true\bot@false\smash@}
  261. \def\botsmash{\top@false\bot@true\smash@}
  262. \def\smash{\top@true\bot@true\smash@}
  263. \def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}%
  264.         \else\let\next\makesm@sh\fi \next }
  265. \def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@}
  266.  
  267.  
  268. %       Vertical `laps'; cf. \llap and \rlap
  269. \long\def\ulap#1{\vbox to \z@{\vss#1}}
  270. \long\def\dlap#1{\vbox to \z@{#1\vss}}
  271.  
  272. %       And centered horizontal and vertical `laps'
  273. \def\xlap#1{\hbox to \z@{\hss#1\hss}}
  274. \long\def\ylap#1{\vbox to \z@{\vss#1\vss}}
  275. \long\def\zlap#1{\ylap{\xlap{#1}}}
  276.  
  277.  
  278. %       Avoid unwanted vertical glue when making up pages.
  279. \def\basezero{\baselineskip\z@skip \lineskip\z@skip}
  280.  
  281.  
  282. %  Empty rules for special occasions
  283. \def\nullhrule{\hrule height\z@ depth\z@ width\z@ }
  284. \def\nullvrule{\vrule height\z@ depth\z@ width\z@ }
  285.  
  286. %       Support ad-hoc strut construction.
  287. \def\makestrut[#1;#2]{\vrule height#1 depth#2 width\z@ }
  288.  
  289.  
  290. %       Today's date, to be printed on drafts.  Based on TeXbook, p.406.
  291.  
  292. \def\today{\number\day\space \ifcase\month\or
  293.         Jan \or Feb \or Mar \or Apr \or May \or Jun \or
  294.         Jul \or Aug \or Sep \or Oct \or Nov \or Dec \fi
  295.         \number\year}
  296.  
  297. %       Current time; this may be system dependent!
  298. \newcount\hours
  299. \newcount\minutes
  300. \def\SetTime{\hours=\time
  301.         \global\divide\hours by 60
  302.         \minutes=\hours
  303.         \multiply\minutes by 60
  304.         \advance\minutes by-\time
  305.         \global\multiply\minutes by-1 }
  306. \SetTime
  307. \def\now{\number\hours:\ifnum\minutes<10 0\fi\number\minutes}
  308.  
  309. \def\Now{\today\ \now}
  310.  
  311. \newif\ifPrelimDraft            \PrelimDraftfalse
  312.  
  313. \def\midrtitle{\ifPrelimDraft {{\tensl preliminary draft, \Now}}\fi}
  314.  
  315. %  Section heads.  The following set of macros is used to set the large
  316. %  TUGboat section heads (e.g. "General Delivery", "Fonts", etc.)
  317.  
  318. \newdimen\PreTitleDrop   \PreTitleDrop=\z@
  319.  
  320. \newskip\AboveTitleSkip  \AboveTitleSkip=12pt
  321. \newskip\BelowTitleSkip  \BelowTitleSkip=8pt
  322.  
  323. \newdimen\strulethickness       \strulethickness=.6pt
  324. \def\sthrule{\hrule height\strulethickness depth \z@ }
  325. \def\stvrule{\vrule width\strulethickness }
  326.  
  327. \newdimen\stbaselineskip        \stbaselineskip=18pt
  328.  
  329. \def\@sectitle #1{%
  330.   \par \SecTitletrue
  331.   \penalty-1000
  332.   \secsep
  333.   \vbox{
  334.     \sthrule
  335.     \hbox{%
  336.       \stvrule
  337.       \vbox{
  338.         \advance\hsize by -2\strulethickness
  339.         \raggedcenter
  340.         \def\\{\unskip\break}%
  341.         \sectitlefont
  342.         \makestrut[2\stfontheight;\z@]
  343.         #1%
  344.         \makestrut[\z@;\stfontheight]\endgraf
  345.         }%
  346.       \stvrule }
  347.     \sthrule }
  348.   \nobreak
  349.   \vskip\baselineskip }
  350.  
  351. %  distance between articles which are run together
  352. \def\secsep{\vskip 5\baselineskip}
  353.  
  354. \newif\ifSecTitle
  355. \SecTitlefalse
  356.  
  357.  
  358.  
  359.  
  360.  
  361. %  Registration marks
  362.  
  363. \def\HorzR@gisterRule{\vrule height 0.2pt depth \z@ width 0.5in }
  364. \def\DownShortR@gisterRule{\vrule height 0.2pt depth 1pc width 0.2pt }
  365. \def\UpShortR@gisterRule{\vrule height 1pc depth \z@ width 0.2pt }
  366.  
  367.  
  368. %               ``T'' marks centered on top and bottom edges of paper
  369.  
  370. \def\ttopregister{\dlap{%
  371.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  372.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}%
  373.         \hbox to \trimwd{\hfil \DownShortR@gisterRule \hfil}}}
  374. \def\tbotregister{\ulap{%
  375.         \hbox to \trimwd{\hfil \UpShortR@gisterRule \hfil}%
  376.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  377.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}}}
  378.  
  379. \def\topregister{\ttopregister}
  380. \def\botregister{\tbotregister}
  381.  
  382.  
  383.  
  384. %       PLAIN's definition of \raggedright doesn't permit any stretch, and
  385. %       results in too many overfull boxes.  We also turn off hyphenation.
  386. \newdimen\raggedskip    \raggedskip=\z@
  387. \newdimen\raggedstretch \raggedstretch=5em    % ems of font set now (10pt)
  388. \newskip\raggedparfill  \raggedparfill=\z@ plus 1fil
  389.  
  390. \def\raggedspaces{\spaceskip=.3333em \relax \xspaceskip=.5em \relax }
  391. %       Some applications may have to add stretch, in order to avoid
  392. %       all overfull boxes.
  393.  
  394. \def\raggedright{%
  395.   \nohyphens
  396.   \rightskip=\raggedskip plus\raggedstretch \raggedspaces
  397.   \parfillskip=\raggedparfill }
  398. \def\raggedleft{%
  399.   \nohyphens
  400.   \leftskip=\raggedskip plus\raggedstretch \raggedspaces 
  401.   \parfillskip=\z@skip }
  402. \def\raggedcenter{%
  403.   \nohyphens
  404.   \leftskip=\raggedskip plus\raggedstretch
  405.   \rightskip=\leftskip \raggedspaces 
  406.   \parindent=\z@ \parfillskip=\z@skip }
  407.  
  408. \def\normalspaces{\spaceskip\z@skip \xspaceskip\z@skip }
  409.  
  410.  
  411. %       Miscellaneous useful stuff
  412.  
  413. \def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
  414.  
  415. %\def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX
  416. \def~{\unskip\nobreak\ \ignorespaces} % AMS-TeX value
  417.  
  418. \def\newbox{\alloc@4\box\chardef\insc@unt}   % remove \outer
  419. \def\boxcs#1{\box\csname#1\endcsname}
  420. \def\setboxcs#1{\setbox\csname#1\endcsname}
  421. \def\newboxcs#1{\expandafter\newbox\csname#1\endcsname}
  422.  
  423. \def\gobble#1{}
  424.  
  425. \def\vellipsis{%
  426.   \leavevmode\kern0.5em
  427.   \raise1pt\vbox{\baselineskip6pt\vskip7pt\hbox{.}\hbox{.}\hbox{.}}
  428.   }
  429.  
  430. \def\bull{\vrule height 1ex width .8ex depth -.2ex } % square bullet
  431. \def\cents{{\rm\raise.2ex\rlap{\kern.05em$\scriptstyle/$}c}}
  432. \def\Dag{\raise .6ex\hbox{$\scriptstyle\dagger$}}
  433.  
  434. \def\careof{\leavevmode\hbox{\raise.75ex\hbox{c}\kern-.15em
  435.                 /\kern-.125em\smash{\lower.3ex\hbox{o}}} \ignorespaces}
  436. \def\sfrac#1/#2{\leavevmode\kern.1em
  437.         \raise.5ex\hbox{\the\scriptfont\z@ #1}\kern-.1em
  438.         /\kern-.15em\lower.25ex\hbox{\the\scriptfont\z@ #2}}
  439.  
  440. \def\thinskip{\hskip 0.16667em\relax}
  441. \def\endash{--}
  442. \def\emdash{\endash-}
  443. \def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
  444. \def\dash{\d@sh\nobreak\endash}
  445. \def\Dash{\d@sh\nobreak\emdash}
  446. \def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}}
  447. \def\rdash{\d@sh\nobreak\endash}
  448. \def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}}
  449. \def\Rdash{\d@sh\nobreak\emdash}
  450.  
  451. %       Hack to permit automatic hyphenation after an actual hyphen.
  452.  
  453. \def\hyph{-\penalty\z@\hskip\z@skip }
  454.  
  455. \def\slash{/\penalty\z@\hskip\z@skip }        % "breakable" slash
  456.  
  457. %  So far, \nth{n} works only for 0 <= n <= 20.
  458. \def\nth#1{\TestCount=#1
  459.     \ifcase\TestCount \def\next{th}%    0th
  460.     \or   \def\next{st}%                1st
  461.     \or   \def\next{nd}%                2nd
  462.     \or   \def\next{rd}%                3rd
  463.     \else \def\next{th}%                nth
  464.     \fi \TestCount=\the\fam\relax #1$^{\fam\TestCount\next}$}
  465.  
  466.  
  467. %       Dates and other items which identify the volume and issue
  468.  
  469. %       To use: \vol 5, 2.
  470. %               \issdate October 1984.
  471. %               \issueseqno=10
  472. %       For production, these are set in a separate file, TUGBOT.DATES,
  473. %       which is issue-specific.
  474.  
  475. \newcount\issueseqno            \issueseqno=-1
  476.  
  477. \def\v@lx{\gdef\volx{Volume~\volno~(\volyr), No.~\issno}}
  478. \def\volyr{}
  479. \def\volno{}
  480. \def\vol #1,#2.{\gdef\volno{#1\unskip}%
  481.         \gdef\issno{\ignorespaces#2\unskip}%
  482.         \setbox\TestBox=\hbox{\volyr}%
  483.         \ifdim \wd\TestBox > .2em \v@lx \fi }
  484.  
  485. \def\issdate #1#2 #3.{\gdef\issdt{#1#2 #3}\gdef\volyr{#3}%
  486.         \gdef\bigissdt{#1{\smc\uppercase{#2}} #3}%
  487.         \setbox\TestBox=\hbox{\volno}%
  488.         \ifdim \wd\TestBox > .2em \v@lx \fi }
  489.  
  490.  
  491. \vol 0, 0.                      % volume, issue.
  492. \issdate Thermidor, 2001.       % month, year of publication
  493.  
  494.  
  495. \ifx\tugstyloaded@\plaintubstyle
  496.   \def\tubissue#1(#2){\TUB~#1, no.~#2}
  497. \else
  498.   \def\tubissue#1#2{\TUB~#1, no.~#2}
  499. \fi
  500.  
  501. \def\xEdNote{{\tenuit Editor's note:\enspace }}
  502.  
  503.  
  504. %       TUGboat conventions include the issue number in the file name.
  505. %       Permit this to be incorporated into file names automatically.
  506. %       If issue number = 11, \Input filnam  will read tb11filnam.tex.
  507.  
  508.  
  509. \def\infil@{\jobname}
  510. \def\Input #1 {\ifnum\issueseqno<0 \def\infil@{#1}%
  511.                 \else \def\infil@{tb\number\issueseqno#1}\fi
  512.                 \edef\jobname{\infil@}\@readFLN
  513.                 \@@input \infil@\relax
  514.                 \ifRMKopen\immediate\closeout\TBremarkfile\RMKopenfalse\fi}
  515.  
  516. \newif\ifRMKopen        \RMKopenfalse
  517. \newwrite\TBremarkfile
  518. \def\TBremarkON#1{%
  519.   \ifRMKopen\else\RMKopentrue\immediate\openout\TBremarkfile=\infil@.rmk \fi
  520.   \toks@={#1}%
  521.   \immediate\write\TBremarkfile{^^J\the\toks@}%
  522.   \immediate\write16{^^JTBremark:: \the\toks@^^J}}
  523. \def\TBremarkOFF#1{}
  524. \let\TBremark=\TBremarkOFF
  525.  
  526. % for marking locations in articles that pertain to remarks
  527. % in another file of editorial comments
  528. \def\TUBedit#1{}
  529.  
  530. % for using different filenames in Providence than those supplied
  531. % by authors
  532.  
  533. \def\TUBfilename#1#2{\expandafter\def\csname file@@#1\endcsname{#2}}
  534. \newread\@altfilenames
  535. \def\@readFLN{\immediate\openin\@altfilenames=\jobname.fln
  536.   \ifeof\@altfilenames\let\@result\relax\else
  537.   \def\@result{\@@input\jobname.fln }\fi
  538.   \immediate\closein\@altfilenames
  539.   \@result}
  540. \@readFLN
  541. \everyjob=\expandafter{\the\everyjob\@readFLN}
  542.  
  543. % Following needs to work entirely in TeX's mouth
  544. \def\@tubfilename#1{\expandafter\ifx\csname file@@#1\endcsname\relax
  545.   #1\else\csname file@@#1\endcsname\fi}
  546.  
  547. \def\fileinput#1{\@@input\@tubfilename{#1} }
  548.  
  549. %       Write out (both to a file and to the log) the starting page number
  550. %       of an article, to be used for cross references and in contents.
  551. %       \pagexref  is used for articles fully processed in the TUGboat run.
  552. %       \PageXref  is used for "extra" pages, where an item is submitted
  553. %               as camera copy, and only running heads (at most) are run.
  554.  
  555. \ifx\tugstyloaded@\plaintubstyle
  556. \def\pagexrefON#1{%
  557.         \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
  558.         \write\ppoutfile{%
  559.                 \def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
  560.         }
  561. \def\PageXrefON#1{%
  562.         \immediate\write-1{\def\expandafter
  563.                         \noexpand\csname#1\endcsname{\number\pageno}}%
  564.         \immediate\write\ppoutfile{\def\expandafter
  565.                         \noexpand\csname#1\endcsname{\number\pageno}}}
  566. \else
  567. \def\pagexrefON#1{%
  568.         \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
  569.         \write\ppoutfile{%
  570.                 \def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
  571.         }
  572. \def\PageXrefON#1{%
  573.         \immediate\write-1{\def\expandafter
  574.                         \noexpand\csname#1\endcsname{\number\c@page}}%
  575.         \immediate\write\ppoutfile{\def\expandafter
  576.                         \noexpand\csname#1\endcsname{\number\c@page}}}
  577. \fi
  578.  
  579. \def\pagexrefOFF#1{}
  580. \let\pagexref=\pagexrefOFF
  581. \def\PageXrefOFF#1{}
  582. \let\PageXref=\PageXrefOFF
  583.  
  584. \def\xreftoON#1{%
  585.   \ifundefined{#1}%
  586.     ???\TBremark{Need cross reference for #1.}%
  587.   \else\csname#1\endcsname\fi}
  588. \def\xreftoOFF#1{???}
  589. \let\xrefto=\xreftoOFF
  590.  
  591. \def\TBdriver#1{}
  592.  
  593.  
  594. %  Authors, addresses, signatures
  595.  
  596. \def\theauthor#1{\csname theauthor#1\endcsname}
  597. \def\theaddress#1{\csname theaddress#1\endcsname}
  598. \def\thenetaddress#1{\csname thenetaddress#1\endcsname}
  599.  
  600. \newcount\count@@
  601. \def\@defaultauthorlist{%         % standard way of listing authors
  602.    \count@=\authornumber
  603.    \advance\count@ by -2
  604.    \count@@=0
  605.    \loop
  606.    \ifnum\count@>0
  607.       \advance\count@@ by 1
  608.       \ignorespaces\csname theauthor\number\count@@\endcsname\unskip,
  609.       \advance\count@ by -1
  610.    \repeat
  611.    \count@=\authornumber
  612.    \advance\count@ by -\count@@
  613.    \ifnum\authornumber>0
  614.      \ifnum\count@>1
  615.        \count@=\authornumber
  616.        \advance\count@ by -1   
  617.        \ignorespaces\csname theauthor\number\count@\endcsname\unskip\ and
  618.        \fi
  619.      \ignorespaces\csname theauthor\number\authornumber\endcsname\unskip
  620.    \fi
  621.   }
  622.  
  623. \def\signature#1{\def\@signature{#1}}
  624. \def\@signature{\@defaultsignature}
  625.  
  626. \def\@defaultsignature{%
  627.   \count@=0
  628.   \loop
  629.   \ifnum\count@<\authornumber
  630.     \medskip
  631.     \advance\count@ by \@ne
  632.     \signaturemark
  633.     \theauthor{\number\count@}\\
  634.     \leavevmode\theaddress{\number\count@}\\
  635.     \leavevmode\thenetaddress{\number\count@}\\
  636.   \repeat
  637.   }
  638.  
  639. \newdimen\signaturewidth   \signaturewidth=12pc
  640. \def\makesignature{%
  641.   \par
  642.   \penalty9000
  643.   \vskip\medskipamount
  644.   \rightline{%
  645.     \vbox{\hsize\signaturewidth \ninepoint \raggedright
  646.       \parindent \z@ \everypar={\hangindent 1pc }
  647.       \parskip \z@skip
  648.       \netaddrat
  649.       \netaddrpercent
  650.       \def\|{\unskip\hfil\break}%
  651.       \def\\{\endgraf}%
  652.       \def\net{\tt}%
  653.       \def\phone{\rm Phone: } \rm
  654.       \@signature}}
  655.   }
  656.  
  657. {\makeactive\@
  658.  \gdef\signatureat{\makeactive\@\def@{\char"40\discretionary{}{}{}}}
  659.  \makeactive\%
  660.  \gdef\signaturepercent{\makeactive\%\def%{\char"25\discretionary{}{}{}}}
  661. }
  662.  
  663. \def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
  664.  
  665.  
  666.  
  667.  
  668. %       some hyphenation exceptions:
  669. \hyphenation{man-u-script man-u-scripts}
  670.  
  671.  
  672. \restorecat\@
  673.  
  674. \endinput
  675.  
  676.  
  677. % *************************************************************************
  678.  
  679. Contents and Notes
  680. ------------------
  681.  
  682. \makeescape, ..., \makecomment allow users to change category
  683. codes a little more easily.
  684.  
  685. \savecat#1 and \restorecat#1 will save and restore the category
  686. of a given character.  These are useful in cases where one doesn't
  687. wish to localize the settings and therefore be required to globally
  688. define or set things.
  689.  
  690. \SaveCS#1 and \RestoreCS#1 save and restore `meanings' of control
  691. sequences.  Again this is useful in cases where one doesn't want to
  692. localize or where global definitions clobber a control sequence which
  693. is needed later with its `old' definition.
  694.  
  695. Abbreviations.  Just a listing with indications of expansion where
  696. that may not be obvious.  For full definitions, see real code above.
  697.  
  698. \AllTeX         (\La)\TeX
  699. \AMS            American Mathematical Society
  700. \AmSTeX
  701. \aw             A-W (abbreviation for Addison-Wesley)
  702. \AW             Addison Wesley
  703. \BibTeX
  704. \CandT          Computers \& Typesetting
  705. \DVItoVDU       DVItoVDU
  706. \JTeX
  707. \JoT            The Joy of \TeX
  708. \LaTeX
  709. \Mc             M ``w/ raised c''
  710. \MF             METAFONT
  711. \mf             Metafont (using small caps)
  712. \MFB            The Metafont book
  713. \mtex           multilingual TeX
  714. \pcMF           pcMF
  715. \PCTeX
  716. \pcTeX
  717. \Pas            Pascal
  718. \PiCTeX
  719. \plain          plain (in typewriter font)
  720. \POBox          P. O. Box
  721. \POBoxTUG       TUG PO Box
  722. \PS             PostScript
  723. \SC             Steering Committee
  724. \SliTeX
  725. \slMF           Metafont (slanted)
  726. \stTeX          TeX for the Atari ST
  727. \TANGLE
  728. \TB             The \TeX book
  729. \TeX
  730. \TeXhax
  731. \TeXMaG
  732. \TeXtures
  733. \TeXXeT
  734. \TUB            TUGboat
  735. \TUG            TeX Users Group
  736. \UNIX
  737. \VAX
  738. \VorTeX
  739. \XeT
  740. \WEB
  741. \WEAVE
  742.  
  743. \NoBlackBoxes           turns off marginal rules marking overfull boxes
  744. \BlackBoxes             turns them back on
  745. \newline                horizontal glue plus a break
  746.  
  747. \ifundefined#1          checks argument with \csname against \relax
  748.  
  749. \topsmash               smashes above baseline  (from AMSTeX)
  750. \botsmash               smashes below baseline  (from AMSTeX)
  751. \smash                  smashes both            (from plain)
  752.  
  753. \ulap                   lap upwards
  754. \dlap                   lap downwards
  755. \xlap                   reference point at center horizontally; 0 width
  756. \ylap                   reference point at center vertically; 0 height, depth
  757. \zlap                   combination \xlap and \ylap
  758.  
  759. \basezero               to avoid insertion of baselineskip and lineskip glue
  760.  
  761. \nullhrule              empty \hrule
  762. \nullvrule              empty \vrule
  763.  
  764. \makestrut[#1;#2]       ad hoc struts;  #1=height, #2=depth
  765.  
  766. \today                  today's date
  767. \SetTime                converts \time to hours, minutes
  768. \now                    displays time in hours and minutes
  769. \Now                    shows current date and time
  770.  
  771. \ifPrelimDraft          flag to indicate status as preliminary draft
  772.  
  773. \rtitlex                TUGboat volume and number info for running head
  774. \midrtitle              information for center of running head
  775.  
  776. \HorzR@gisterRule       pieces of registration marks ("trimmarks")
  777. \DownShortR@gisterRule
  778. \UpShortR@gisterRule
  779.  
  780. \ttopregister           top registration line with `T' in center
  781. \tbotregister           bottom registration line with inverted `T' in center
  782. \topregister            register actually used
  783. \botregister
  784.  
  785.  
  786. \raggedskip             parameters used for ragged settings
  787. \raggedstretch
  788. \raggedparfill
  789. \raggedspaces
  790.  
  791. \raggedright
  792. \raggedleft
  793. \raggedcenter
  794. \normalspaces
  795. \raggedbottom
  796.  
  797. \bull                   square bullet
  798. \cents                  ``cents'' sign
  799. \Dag                    superscripted dagger
  800. \careof                 c/o
  801. \sfrac                  slashed fraction
  802.  
  803. \dash                   en-dash surrounded by thinspaces; only breakable AFTER
  804. \Dash                   em-dash, as above
  805.  
  806. \hyph                   permit automatic hyphenation after an actual hyphen
  807.  
  808. \slash                  "breakable" slash
  809. \nth                    for obtaining "1^{st}", "2^{nd}", 3^{rd}, etc.
  810.  
  811. \tubissue               gets \TUB followed by volume and issue numbers
  812.  
  813. \xEdNote                Editor's Note:
  814.  
  815. \Input                  \input with some other bookkeepping for
  816.                         case where multiple articles are put together
  817.  
  818. \TBremark               reminder to TUGboat editorial staff
  819. \TBremarkON
  820. \TBremarkOFF
  821.  
  822. \pagexref               used to write out page numbers to screen and
  823. \pagexrefON             external files
  824. \pagexrefOFF
  825. \PageXref
  826. \PageXrefON
  827. \PageXrefOFF
  828.  
  829. \xrefto                 used for symbolic cross-reference to other pages
  830. \xreftoON               in TUGboat
  831. \xreftoOFF
  832.  
  833. \TBdriver               marks code which only takes effect when articles
  834.                         are run together in a driver file
  835.  
  836. \signatureat            items for signatures
  837. \signaturepercent
  838. \signaturemark
  839. \signaturewidth
  840.  
  841.  
  842. % *************************************************************************
  843.  
  844. % Change history
  845.  
  846. v1.10    8 Mar 92
  847. added \AllTeX
  848. changed file name from .COM to .CMN to avoid objection that .COM files
  849.   have a special significance on DOS and other operating systems
  850. added standard headers, prepared for archive installation
  851.  
  852. v1.09    5 May 91
  853. inserted large penalty at top of \makesignature to inhibit break
  854.   between article and signature
  855.  
  856. v1.08   24 Oct 90
  857. modified signature slightly (took \medskip out of box)
  858. fixed bug in previous rendition of \@readFLN
  859.  
  860. v1.07   16 Oct 90
  861. added \TUBedit to facilitate editorial marking
  862. added \iinput variant from LaTeX; \input redefined now as with LaTeX
  863. added mechanism for local file names in Providence (\TUBfilename,
  864.   \fileinput, etc.)
  865. \tugstyload@ defaults to plain if it's not defined
  866.  
  867. v1.06    3 Aug 90
  868. added \leavevmode to \@defaultsignature so that \everypar is not
  869.   executed inside a group
  870. dash routines modified and corrected (to suppress insertion of
  871.   discretionary node after -- and ---; and to allow hyphenation of
  872.   ensuing word).  Changed \lDash to \Ldash and \rDash to \Rdash.
  873.  
  874. v1.05   29 Mar 90
  875. added \lDash and \rDash for `parenthetical' dashing
  876. added \TP for TeX: The Program
  877. added \relax after file input of \Input
  878. added \relax before \ifmmode of \,
  879.  
  880. v1.04   28 Feb 90
  881. modified pagexref macros to work in both plain and latex styles
  882. (this should NOT affect authors)
  883.  
  884. v1.03   26 Feb 90
  885. removed <tab>s and adjusted definition of \slMF
  886.  
  887. v1.02   25 Feb 90
  888. added definitions of \plaintubissue, \latextubissue
  889. added definition of \tubissue
  890.  
  891. v1.01   19 Feb 90
  892. added \signaturewidth to allow for modification
  893. added \nth to obtain 1^{st}, etc.
  894.  
  895.  
  896.  
  897.